package com.github.llyb120.qiuyasql.driver;

import com.github.llyb120.qiuyasql.entity.FieldType;
import com.github.llyb120.qiuyasql.entity.TableEntity;
import com.github.llyb120.qiuyasql.entity.TableField;
import com.github.llyb120.qiuyasql.entity.TablePatch;

import java.util.List;

/**
 * @Author: Administrator
 * @Date: 2020/10/7 18:02
 */
public interface SqlDriver {

    String buildCreateTableSql(TableEntity entity);
    String buildAlterTableColumnSql(TableEntity tableEntity, TablePatch patch);//List<TableField> lessFields, List<TableField> changedFields);
    FieldType getTypeFromField(String type);
    boolean hasWrongTable(Throwable throwable);
    boolean hasWrongColumn(Throwable throwable);
}

